package com.gzx.spring.db.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 征信用户授权表
 * </p>
 *
 * @author qinpeng
 * @since 2025-11-17
 */
@Getter
@Setter
@TableName("credit_user_authorization")
@ApiModel(value = "CreditUserAuthorization对象", description = "征信用户授权表")
public class CreditUserAuthorization implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("关联用户ID")
    @TableField("uid")
    private Long uid;

    @ApiModelProperty("姓名")
    @TableField("user_name")
    private String userName;

    @ApiModelProperty("性别")
    @TableField("sex")
    private String sex;

    @ApiModelProperty("身份证号")
    @TableField("id_card")
    private String idCard;

    @ApiModelProperty("身份证有效期")
    @TableField("id_lastdate")
    private String idLastdate;

    @ApiModelProperty("手机号")
    @TableField("phone")
    private String phone;

    @ApiModelProperty("身份证正面URL")
    @TableField("id_card_front_url")
    private String idCardFrontUrl;

    @ApiModelProperty("身份证反面URL")
    @TableField("id_card_back_url")
    private String idCardBackUrl;

    @ApiModelProperty("人脸识别或手持身份证照片URL")
    @TableField("person_verify_url")
    private String personVerifyUrl;

    @ApiModelProperty("CA电子授权书URL")
    @TableField("ca_auth_url")
    private String caAuthUrl;

    @ApiModelProperty("委托担保申请书URL")
    @TableField("guarantee_apply_url")
    private String guaranteeApplyUrl;

    @ApiModelProperty("华融授权序列号")
    @TableField("serial_number")
    private String serialNumber;

    @ApiModelProperty("授权提交日期时间（格式：YYYY-MM-DD HH:MM:SS）")
    @TableField("auth_submit_datetime")
    private LocalDateTime authSubmitDatetime;

    @ApiModelProperty("授权过期时间（30天后）")
    @TableField("auth_expire_datetime")
    private LocalDateTime authExpireDatetime;

    @ApiModelProperty("授权状态：0-未提交，1-授权中，2-授权成功，3-授权失败")
    @TableField("authorization_status")
    private Integer authorizationStatus;

    @ApiModelProperty("征信信息")
    @TableField("credit_info")
    private String creditInfo;
}
